package main

import (
	"github.com/emicklei/go-restful"
	"net/http"
	"friend"
)

func main() {
	container := restful.NewContainer()
	friend.Register(container)

	server := &http.Server{
		Addr: "0.0.0.0:8080",
		Handler: container}

	fs := http.FileServer(http.Dir("swagger"))
	http.Handle("/swagger/", http.StripPrefix("/swagger/", fs))
	go http.ListenAndServe(":8000", nil)

	server.ListenAndServe()
}
